accessor_sources = [
  'accessor.cpp',
  'accessor_abi.cpp',
  'interface/i_accessor.cpp',
]

accessor_static_lib = static_library(
  'Accessor',
  accessor_sources,
  include_directories: include_dirs,
  dependencies: [dev_deps],
  install: false,
)

accessor_lib = shared_library(
  'Accessor',
  include_directories: include_dirs,
  name_prefix: 'lib',
  name_suffix: 'so',
  install: true,
  install_dir: drivers_install_dir,
  link_whole: [accessor_static_lib],
)

accessor_dep = declare_dependency(
  link_with: accessor_lib,
  dependencies: [libmcpp_deps],
)

if build_tests
  custom_target(
    'copy_libAccessor',
    output: 'copy_libAccessor',
    command: ['cp', accessor_lib.full_path(), drivers_install_dir],
    depends: accessor_lib,
    build_by_default: true,
  )
endif